
<template>
    <div class="school">
        <h3>学校名称：{{schoolName}}</h3> 
    </div>
</template>

<script>
    export default {
        name: 'School',
        props: ['getSchoolName'],
        data() {
            return {
                schoolName: 'xxx'
                }
            },
        
        mounted() {
            this.$bus.$on("demoLine", (data) => {
                console.log("School组件, 收到了数据", data)
            })
        },
        beforeDestroy() {
            this.$bus.$off("demoLine")
        },
        }
</script>
<style scoped>
    .school{
        background-color: rgb(42, 165, 132);
        padding: 5px;
    }
</style>